<?php
$categories = $viewModel->get('categories');
    $getAction = $_GET['action'];
    
if (strtolower($getAction) == strtolower("viewDetail")) {
    $getPage = $viewModel->get("news")->category_id;
    
} else {
    $getPage = $_GET['id'];

}
?>
<div class="menu">
    <ul class="sf-menu sf-navbar">
        <li class="home-menu"><a href="<?php echo BASE_URL . 'Home'; ?>">Home</a></li>
        <li >
            <a <?php echo (empty($getAction)) ? "id='sltCate'" : ""; ?> href="<?php echo BASE_URL . 'Home'; ?>">Trang chủ</a>
            <!--      	<ul>
                      <li><a href=""></a></li>
                    </ul>-->
        </li>
        <li><a <?php echo ($getAction == "Timetable") ? "id='sltCate'" : ""; ?> href="<?php echo BASE_URL . 'Home/Timetable' ?>">THỜI KHÓA BIỂU</a></li>
        <?php
        foreach ($categories as $cate) {
            if ($cate->category_id == $getPage) {
                $classCss = "id='sltCate'";
            } else {
                $classCss = '';
            }
            ?>
            <li >
                <a  <?php echo $classCss; ?> href="<?php echo BASE_URL . 'Home/ViewsContent/' . $cate->category_id; ?>"><?php echo $cate->category_name; ?></a>
            </li>
            <?php
        }
        ?>
        <li><a <?php echo ($getAction == "AboutUs") ? "id='sltCate'" : ""; ?> href="<?php echo BASE_URL . 'Home/AboutUs/' ?>">Giới thiệu</a></li>
        <li><a <?php echo ($getAction == "Contact") ? "id='sltCate'" : ""; ?> href="<?php echo BASE_URL . 'Home/Contact/' ?>">Liên hệ</a></li>
    </ul>
</div><!-- end menu-->